using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._ModelTools._Iterator
{
    /// <summary>
    /// <para>Iterate Datasets</para>
    /// <para>Iterates over datasets in a workspace or feature dataset.</para>
    /// <para>循环访问工作空间或要素数据集中的数据集。</para>
    /// </summary>    
    [DisplayName("Iterate Datasets")]
    public class IterateDatasets : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public IterateDatasets()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_workspace">
        /// <para>Workspace or Feature Dataset</para>
        /// <para>Workspace or a feature dataset which stores the dataset to iterate.</para>
        /// <para>工作空间或要素数据集，用于存储要迭代的数据集。</para>
        /// </param>
        public IterateDatasets(object _in_workspace)
        {
            this._in_workspace = _in_workspace;
        }
        public override string ToolboxName => "Model Tools";

        public override string ToolName => "Iterate Datasets";

        public override string CallName => "mb.IterateDatasets";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_in_workspace, _wildcard, _dataset_type.GetGPValue(), _recursive.GetGPValue(), _dataset, _name];

        /// <summary>
        /// <para>Workspace or Feature Dataset</para>
        /// <para>Workspace or a feature dataset which stores the dataset to iterate.</para>
        /// <para>工作空间或要素数据集，用于存储要迭代的数据集。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Workspace or Feature Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_workspace { get; set; }


        /// <summary>
        /// <para>Wildcard</para>
        /// <para>A combination of * and characters that help to limit the results. The asterisk is the same as saying ALL. If no wildcard is specified, all inputs will be returned. For example, it can be used to restrict Iteration over input names starting with a certain character or word (for example, A* or Ari* or Land* and so on).</para>
        /// <para>* 和字符的组合，有助于限制结果。星号与说 ALL 相同。如果未指定通配符，则将返回所有输入。例如，它可用于限制对以特定字符或单词开头的输入名称（例如，A* 或 Ari* 或 Land* 等）的迭代。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Wildcard")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _wildcard { get; set; } = null;


        /// <summary>
        /// <para>Dataset Type</para>
        /// <para><xdoc>
        ///   <para>The dataset type to iterate over.</para>
        ///   <bulletList>
        ///     <bullet_item>Computer Aided Design (CAD)—Only CAD dataset will be the output.</bullet_item><para/>
        ///     <bullet_item>Feature—Only Feature dataset will be the output.</bullet_item><para/>
        ///     <bullet_item>Geometric Network—Only Geometric Network dataset will be the output.</bullet_item><para/>
        ///     <bullet_item>Mosaic—Only Mosaic dataset will be the output.</bullet_item><para/>
        ///     <bullet_item>Network—Only Network dataset will be the output.</bullet_item><para/>
        ///     <bullet_item>Parcel Fabric—Only Parcel Fabric dataset will be the output.</bullet_item><para/>
        ///     <bullet_item>Raster—Only Raster dataset will be the output.</bullet_item><para/>
        ///     <bullet_item>Terrain—Only Terrain dataset will be the output.</bullet_item><para/>
        ///     <bullet_item>Triangular Irregular Networks (TIN)—Only TIN dataset will be the output.</bullet_item><para/>
        ///     <bullet_item>Topology—Only Topology dataset will be the output.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>要迭代的数据集类型。</para>
        ///   <bulletList>
        ///     <bullet_item>计算机辅助设计 （CAD） - 仅输出 CAD 数据集。</bullet_item><para/>
        ///     <bullet_item>要素 - 仅要素数据集作为输出。</bullet_item><para/>
        ///     <bullet_item>几何网络—仅输出几何网络数据集。</bullet_item><para/>
        ///     <bullet_item>镶嵌—仅镶嵌数据集将作为输出。</bullet_item><para/>
        ///     <bullet_item>网络—仅网络数据集为输出。</bullet_item><para/>
        ///     <bullet_item>宗地结构—仅输出宗地结构数据集。</bullet_item><para/>
        ///     <bullet_item>栅格 - 仅栅格数据集作为输出。</bullet_item><para/>
        ///     <bullet_item>Terrain—仅输出 Terrain 数据集。</bullet_item><para/>
        ///     <bullet_item>三角不规则网络 （TIN） - 仅输出 TIN 数据集。</bullet_item><para/>
        ///     <bullet_item>拓扑 - 仅输出拓扑数据集。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Dataset Type")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _dataset_type_value? _dataset_type { get; set; } = null;

        public enum _dataset_type_value
        {
            /// <summary>
            /// <para>Computer Aided Design (CAD)</para>
            /// <para>Computer Aided Design (CAD)—Only CAD dataset will be the output.</para>
            /// <para>计算机辅助设计 （CAD） - 仅输出 CAD 数据集。</para>
            /// </summary>
            [Description("Computer Aided Design (CAD)")]
            [GPEnumValue("CAD")]
            _CAD,

            /// <summary>
            /// <para>Feature</para>
            /// <para>Feature—Only Feature dataset will be the output.</para>
            /// <para>要素 - 仅要素数据集作为输出。</para>
            /// </summary>
            [Description("Feature")]
            [GPEnumValue("FEATURE")]
            _FEATURE,

            /// <summary>
            /// <para>Geometric Network</para>
            /// <para>Geometric Network—Only Geometric Network dataset will be the output.</para>
            /// <para>几何网络—仅输出几何网络数据集。</para>
            /// </summary>
            [Description("Geometric Network")]
            [GPEnumValue("GEOMETRICNETWORK")]
            _GEOMETRICNETWORK,

            /// <summary>
            /// <para>Mosaic</para>
            /// <para>Mosaic—Only Mosaic dataset will be the output.</para>
            /// <para>镶嵌—仅镶嵌数据集将作为输出。</para>
            /// </summary>
            [Description("Mosaic")]
            [GPEnumValue("MOSAIC")]
            _MOSAIC,

            /// <summary>
            /// <para>Network</para>
            /// <para>Network—Only Network dataset will be the output.</para>
            /// <para>网络—仅网络数据集为输出。</para>
            /// </summary>
            [Description("Network")]
            [GPEnumValue("NETWORK")]
            _NETWORK,

            /// <summary>
            /// <para>Parcel Fabric</para>
            /// <para>Parcel Fabric—Only Parcel Fabric dataset will be the output.</para>
            /// <para>宗地结构—仅输出宗地结构数据集。</para>
            /// </summary>
            [Description("Parcel Fabric")]
            [GPEnumValue("PARCELFABRIC")]
            _PARCELFABRIC,

            /// <summary>
            /// <para>Raster</para>
            /// <para>Raster—Only Raster dataset will be the output.</para>
            /// <para>栅格 - 仅栅格数据集作为输出。</para>
            /// </summary>
            [Description("Raster")]
            [GPEnumValue("RASTER")]
            _RASTER,

            /// <summary>
            /// <para>Terrain</para>
            /// <para>Terrain—Only Terrain dataset will be the output.</para>
            /// <para>Terrain—仅输出 Terrain 数据集。</para>
            /// </summary>
            [Description("Terrain")]
            [GPEnumValue("TERRAIN")]
            _TERRAIN,

            /// <summary>
            /// <para>Triangular Irregular Networks (TIN)</para>
            /// <para>Triangular Irregular Networks (TIN)—Only TIN dataset will be the output.</para>
            /// <para>三角不规则网络 （TIN） - 仅输出 TIN 数据集。</para>
            /// </summary>
            [Description("Triangular Irregular Networks (TIN)")]
            [GPEnumValue("TIN")]
            _TIN,

            /// <summary>
            /// <para>Topology</para>
            /// <para>Topology—Only Topology dataset will be the output.</para>
            /// <para>拓扑 - 仅输出拓扑数据集。</para>
            /// </summary>
            [Description("Topology")]
            [GPEnumValue("TOPOLOGY")]
            _TOPOLOGY,

        }

        /// <summary>
        /// <para>Recursive</para>
        /// <para><xdoc>
        ///   <para>Determines if subfolders in the input workspace will be iterated through recursively.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—Will iterate through all subfolders.</bullet_item><para/>
        ///     <bullet_item>Unchecked—Will not iterate through all subfolders.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>确定是否以递归方式循环访问输入工作区中的子文件夹。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 （Checked） - 将循环访问所有子文件夹。</bullet_item><para/>
        ///     <bullet_item>未选中 - 不会循环访问所有子文件夹。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Recursive")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _recursive_value _recursive { get; set; } = _recursive_value._false;

        public enum _recursive_value
        {
            /// <summary>
            /// <para>RECURSIVE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("RECURSIVE")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NOT_RECURSIVE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NOT_RECURSIVE")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Dataset</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _dataset { get; set; }


        /// <summary>
        /// <para>Name</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Name")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _name { get; set; }


        public IterateDatasets SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}